home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-03 | 4.3 KB | 159 lines | [TEXT/CWIE] |
- //========================================================================================
- //
- // File: Commands.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef COMMANDS_H
- #define COMMANDS_H
-
- // ----- Framework Includes -----
-
- #ifndef FWCLPCMD_H
- #include "FWClpCmd.h"
- #endif
-
- #ifndef FWDRCMD_H
- #include "FWDrCmd.h"
- #endif
-
- #ifndef FWBNDSTR_H
- #include "FWBndStr.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CAMSampleContent;
-
- //========================================================================================
- // CAMSampleEditCommand
- //========================================================================================
-
- class CAMSampleEditCommand : public FW_CClipboardCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CAMSampleEditCommand)
-
- CAMSampleEditCommand(Environment* ev,
- ODCommandID id,
- CAMSampleContent* itsContent,
- FW_CFrame* frame);
-
- virtual ~CAMSampleEditCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- private:
- void RemoveSelection(Environment* ev);
- void RestoreSelection(Environment* ev);
- void SwapSelection(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CAMSampleContent* fAMSampleContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
-
-
- //========================================================================================
- // class CAMSampleDragCommand
- //========================================================================================
-
- class CAMSampleDragCommand : public FW_CDragCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CAMSampleDragCommand)
-
- CAMSampleDragCommand(Environment* ev,
- CAMSampleContent* content,
- FW_CFrame* frame);
- virtual ~CAMSampleDragCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CAMSampleContent* fAMSampleContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
- //========================================================================================
- // class CAMSampleDropCommand
- //========================================================================================
-
- class CAMSampleDropCommand : public FW_CDropCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CAMSampleDropCommand)
-
- CAMSampleDropCommand(Environment *ev,
- CAMSampleContent* content,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* odFacet,
- const FW_CPoint& dropPoint);
-
- virtual ~CAMSampleDropCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- private:
- void SwapSelection(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CAMSampleContent* fAMSampleContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
-
- #endif
-